home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / WASTE Object Handlers 1.2.2.sit / WASTE Object Handlers 1.2.2 / 1.1->1.2.x Transition Notes next >
Text File  |  1996-07-16  |  4KB  |  36 lines

  1. This is just a short note aimed at helping current users of the WASTE Object Handlers (v1.1 and below) ease into the new 1.2 version.  If you are starting new with v1.2, then you can ignore this.
  2.  
  3. The differences and changes to your code are fairly minor and easy to perform (especially if you like using Find/Replace-All).
  4.  
  5. ・  If you use InstallAllWASTEObjHandlers(), you will now need to pass a WEReference as an argument.  Most likely, however, you will probably just need to pass nil since if you're using this function, you probably are installing all the object handlers globally.
  6.  
  7. ・  You will need to add calls to InitWASTEObjectHandlers() and ExitWASTEObjectHandlers() in your startup/intialization routine and your shutdown/quit routine, respectively.  Currently, these routines don't do much (Init only does something if a preprocessor directive is true, and Exit does nothing), but they are there to allow for future handler additions.  Even though the calls don't do much of anything now, do add them into your code so when a new object handler is added, your application will function properly without problems.
  8.  
  9. ・  Calls to CheckSoundStatus() should be removed and replaced with calls to DoObjectTasks(). Currently, all DoObjectTasks() does is call CheckSoundStatus().  However, as noted above, you should go ahead and begin to use DoObjectTasks() instead to allow for seemless functionality when new object handlers are added.  For now, just pass nil to DoObjectTasks().  In future releases of the library how DoObjectTasks() is used will change.  See below for more information.
  10.  
  11. ・  You should replace your calls to WEPaste() with WEObjectsPaste().  Right now all WEObjectsPaste() does is call WEPaste(), but once again, this it to allow room for future expansion when new handlers come out.  WEObjectsPaste() would allow for object types in the scrap that need special handing during a paste to be pasted properly.
  12.  
  13. For the curious, these API changes are good in and of themselves because they do make the library much easier to expand.  The reason they were added in was because Michael was beginning work on the v2.0 release of the library, which would include a QuickTime movie object handler.  The movie handler is the main reason these new functions and changes were needed (especially DoObjectTasks() and WEObjectsPaste()).  Progress on the movie handler is halted pending figuring out some pasting problems and HFS drag problems, but as soon as they get fixed, the 2.0 release will be made (most likely by me).  You will NEED these new library API changes integrated into your code in order to work with v2.0 and the movie object handler, so it's best to make the changes now to make future transitions easier.
  14.  
  15. Here's the low-down on DoObjectTasks() if you want to start working on this functionality now.  Again, right now just pass nil to DoObjectTasks() if you want to keep it simple.  The reason the routine takes a WEReference as an argument is because some objects might require instance specific handling.  To make this all work, what you will need to do in your event loop is walk through every WASTE instance there is and call DoObjectTasks() for it.  Right now, we're still looking into the details of how to do this (and just how you do it will be dependant on how you maintain a list of WASTE instances), but here's an example.
  16.  
  17. // assume we store a handle to the WASTE instance in the window's refCon
  18.  
  19. WindowRef window = LMGetWindowList();
  20. WEReference we = (WEReference)GetWRefCon( window );
  21.  
  22. while ( window != nil && we != nil )
  23. {
  24.   DoObjectTasks( we );
  25.  
  26.   we = (WEReference)GetWRefCon( GetNextWindow( window ) );
  27. }
  28.  
  29. When we get the movie handler fully implimented, this will become necessary to do.  When that happens, we'll try to have something in the distribution to give you a good idea of just how to do this sort of thing.
  30.  
  31. That SHOULD be everything you need to know and do to update your code to work with the v1.2 API changes.  If something is wrong or needs updating or I forgot something, please contact me, not Michael since I'm working on the handler library while Michael is away.  I'll try to get any fixes/updates out asap
  32.  
  33. John C. Daub <mailto:hsoi@eden.com>
  34. 1 April 1996
  35.  
  36. Michael Kamprath <mailto:kamprath@kagi.com>